package middleware

import (
	"github.com/gin-gonic/gin"
	"thread/pkg"
)

func JwtPare() gin.HandlerFunc {
	return func(c *gin.Context) {

		heard := c.GetHeader("token")
		token, _ := pkg.GetToken(heard)

		c.Set("userId", token)
		c.Next()

	}
}
